<template>
  <div>
    <el-carousel :interval="4000" type="card" height="240px">
      <el-carousel-item v-for="item in banners" :key="item.url">
        <h3 class="medium"> <a :href="item.url"><img :src="item.imageUrl" alt="error"></a></h3>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  name: "Banner",
  props: ["banners"]
}
</script>

<style scoped>
.el-carousel__item h3 {
  color: #475669;
  font-size: 1rem;
  opacity: 0.75;
  line-height: 240px;
  margin: 0;
}

img {
  width: 100%;
  height: 240px;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>